<!DOCTYPE html>
<%include("inc/html.html"){};%>
    <title>${config.webname!'WE823 CMS'} - 案例展示</title>
    <%include("inc/css.html"){};%>
	<link rel="stylesheet" href="${ctx}/static/assets/lightbox/css/lightbox.css">
	</head>
    <body>
    <div class="container-fluid">
    	<header>
    		<%layout("inc/header.html",{isFirstPage:false}){};%>
    	</header>
    	<div class="container-fluid">
    		<div class="container">
    			<div class="col-md-2">
    				<#cms_case_categories var="case_categories">
					<dl class="left-content" id="case_categories">
						<dt>案例分类</dt>
						<%for(case_category in case_categories){%>
						<dd data-index="${case_category.id!0}">
							<a href="javascript:void(0)" data-id="${case_category.id!0}" data-name="${case_category.name!'未知'}" >${case_category.name!'未知'}</a>
						</dd>
						<%}%>
					</dl>
					</#cms_case_categories>
    			</div>
    			<div class="col-md-10">
	    			<section class="right-section" >
	    				<div class="section-title"></div>
						<div class="section-detail">
							<ul id="case-list">
							</ul>
							<div id="case-show"></div>
							<script id="cases-template" type="text/html">
								<li><a href="case_{{id}}.jspx" target="_blank">{{title}}</a></li>
							</script>
							<script id="case-template" type="text/html">
								<div>{{title}}</div>
								<div>{{addtime}}</div>
								<div>{{#content}}</div>
							</script>
							<script id="case-empty-template" type="text/html">
								<div>暂时无相关案例</div>
							</script>
                       </div>
	    			</section>
				</div>
    		</div>
    	</div>
    	<footer>
    		<%include("inc/footer.html"){};%>
    	</footer>
    </div>
	<%include("inc/js.html"){};%>
	<script src="${ctx}/static/assets/lightbox/js/lightbox-2.6.min.js"></script>
	<script src="${ctx}/static/assets/jquery/template.js"></script>
	<script src="${ctx}/static/skins/${theme}/js/main.js"></script>
	<script>
		$(document).ready(function(){
			
			$(".left-content").pin({
				containerSelector:'.container',
				minWidth:940
			});
			
			var options={
				category_id:${category_id!0},parent_id:${parent_id!0}
			};
			var title = "${category_name!'所有案例'}";
			CMS.Cases.gets(options,title);
			$("#case_categories a").on("click",function(){
				var category_id = $(this).attr("data-id");
				var parent_id = $(this).attr("data-parent");
				var title=$(this).attr("data-name");
				var options = {category_id:category_id,parent_id:parent_id};
				CMS.Cases.gets(options,title);
			});
		});
	</script>
    </body>
 </html>  